import $http from "./index.js"


export const getData = $http.get("http://jsonplaceholder.typicode.com/posts")


//检验token的合法性
export const checkToken = () =>{
	return $http.get("/users/checkToken")
}

//登录
export const login =(data) =>{
	return $http.post("/users/login",data)
}

// 注册
export const register =(data) =>{
	return $http.post("/users/register",data)
}

